﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using DevPhone.Controls;
using Microsoft.Phone.Controls;

namespace DevPhoneToolkitSample.Samples
{
    public partial class WindowsBoxBasicSample : PhoneApplicationPage
    {
        public WindowsBoxBasicSample()
        {
            InitializeComponent();
        }

        private void MsgErrTap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            WindowsBoxService.Box()
                .MessageBox("Title", WindowsBoxMessageType.Error)
                .Show("Sample message.");
        }

        private static void ShowResultMsg(WindowsBoxResultEventArgs e)
        {
            MessageBox.Show("Button clicked " + e.ButtonResult);
        }

        private void MsgWarTap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            WindowsBoxService.Box()
                .MessageBox("Title", WindowsBoxMessageType.Warning, ShowResultMsg)
                .Show("Sample message.");
        }

        private void MsgInfTap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            WindowsBoxService.Box()
                .MessageBox("Title", WindowsBoxMessageType.Information)
                .Show("Sample message.");
        }

        private void MsgQstTap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            WindowsBoxService.Box()
                .MessageBox("Title", WindowsBoxMessageType.Question, ShowResultMsg)
                .Show("Sample message.");
        }

        private void MsgStdTap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            WindowsBoxService.Set()
                .Title("Title")
                .Show("Sample message. Color title is PhoneAccentBrush.");
        }

        private void MsgNbtTap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            WindowsBoxService.Set()
                .Title("Title")
                .ButtonType(WindowsBoxButtonType.Custom)
                .Show("Tap over message box to close.");
        }

    }
}